package com.server.impl;

import java.util.List;

import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.dao.RecordMapper;
import com.entity.Record;
import com.server.RecordServer;
@Service
public class RecordServerImpi implements RecordServer {
   @Resource
   private RecordMapper gdao;
	@Override
	public int add(Record po) {
		return gdao.insert(po);
	}

	@Override
	public int update(Record po) {
		return gdao.updateByPrimaryKeySelective(po);
	}

	@Override
	public int delete(int id) {
		return gdao.deleteByPrimaryKey(id);
	}

	@Override
	public List<Record> getAll(Map<String, Object> map) {
		return gdao.getAll(map);
	}

	@Override
	public Record checkUname(String account) {
		return null;
	}

	@Override
	public List<Record> getByPage(Map<String, Object> map) {
		return gdao.getByPage(map);
	}

	@Override
	public int getCount(Map<String, Object> map) {
		return gdao.getCount(map);
	}

	@Override
	public List<Record> select(Map<String, Object> map) {
		return gdao.select(map);
	}

	@Override
	public Record getById(int id) {
		return gdao.selectByPrimaryKey(id);
	}

}
